﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
 Inherits="System.Web.Mvc.ViewPage<Beeldbankmvc.ViewModels.ReactionViewModel>" %>
<%@ Import Namespace="Beeldbankmvc.Models" %>
<%@ Import Namespace="Beeldbankmvc.Code" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">Uw servicemelding status</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<h2>Uw servicecall status</h2>
	<div id="register">
		<% using (Html.BeginForm()) {%>
			<%: Html.ValidationSummary(true) %>

			<% if (Model.reactionObjects.Count > 0)
			   {%>
		
			<fieldset>
				<legend style="Display: none;">Velden</legend>
				<p>
					<label for="Boodschap">Boodschap</label>  
					<%: Html.TextAreaFor(model => model.reactionObjects[0].Boodschap,10,20,null)%>
					<%: Html.ValidationMessageFor(model => model.reactionObjects[0].Boodschap)%>
				</p>           
			</fieldset>

			<p>
				<input type="submit" class="button" value="Opslaan en reactie sturen" />
			</p>

				<% } 
			   else
			   { %>
				<div>Deze reactie bevat geen gegevens.</div>
				<% } %>

		<% } %>
	</div>

	<h2>Correspondentie</h2>

		<table class="winkelwagen" summary="Correspondentie over de servicecall">
		<caption>Correspondentie</caption>
		<thead>
			<tr>
				<th colspan="5" scope="colgroup">
					Servicecall correspondentie
				</th>
			</tr>
			<tr>
				<th scope="col">
					Datum
				</th>
				<th scope="col">
					Categorie
				</th>
				<th scope="col">
					Onderwerp
				</th>
				<th scope="col">
					Boodschap
				</th>
				<th scope="col">
					Status
				</th>
			</tr>
		</thead>
		<tbody>
			<% foreach (Beeldbankmvc.Models.BEELDBANK_REACTIE_CORRESPONDENTIE reaction in Model.correspondenceObjects)
			   { %>
				<tr>
					<th scope="row">
						<%: reaction.Datum.ToString() %>&nbsp;
					</th>
					<td>
						<%: IdMapper.mapReactionCategory(reaction.Category) %>&nbsp;
					</td>
					<td>
						<%: IdMapper.mapReactionSubject(reaction.Subject) %>&nbsp;
					</td>
					<td>
						<%: reaction.Boodschap %>&nbsp;
					</td>
					<td>
					   <% if (reaction.BEELDBANK_REACTIESTATUS != null)
					   {%>
						<%: reaction.BEELDBANK_REACTIESTATUS.Name %>&nbsp;
					   <% } %>
					</td>
				</tr>
			<%} %>
		</tbody>
	</table>
</asp:Content>


